const mongoose = require('mongoose')

// 数据库连接 默认端口27017
mongoose.connect('mongodb://localhost/playground')
  .then(() => console.log('数据库连接成功'))
  .catch(() => console.log('数据库连接失败'));